home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / DJSRC111.ZIP / go32 / gdt.h < prev    next >
Text File  |  1993-08-10  |  2KB  |  83 lines

  1. /* This is file GDT.H */
  2. /*
  3. ** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15. /* Modified for VCPI Implement by Y.Shibata Aug 5th 1991 */
  16. /* History:28,1 */
  17.  
  18. #include "gotypes.h"
  19.  
  20. typedef struct GDT_S {
  21. word16 lim0;
  22. word16 base0;
  23. word8 base1;
  24. word8 stype;    /* type, DT, DPL, present */
  25. word8 lim1;    /* limit, granularity */
  26. word8 base2;
  27. } GDT_S;
  28.  
  29. #define g_zero        0
  30. #define g_gdt        1
  31. #define g_idt        2
  32. #define g_rcode        3
  33. #define g_rdata        4
  34. #define g_pcode        5
  35. #define g_pdata        6
  36. #define g_core        7
  37. /* CB change: this is needed to map the BIOS data seg at 0x400 to selector 0x40 */
  38. /* this makes several VESA BIOS paging functions work in protected mode */
  39. /* OLD:
  40.  * #define g_acode    8
  41.  */
  42. #define g_BIOSdata    8
  43. /* end CB change */
  44. #define g_adata        9
  45. #define g_ctss        10
  46. #define g_atss        11    /* set according to tss_ptr in go32() */
  47. #define g_ptss        12
  48. #define g_itss        13
  49. #define g_rc32        14    /* for NPX utils */
  50. #define g_grdr        15
  51.  
  52. #define g_vcpicode    16    /* for VCPI Call Selector in Protect Mode */
  53. #define g_vcpireserve0  17
  54. #define g_vcpireserve1  18
  55.  
  56. #define g_v74        19
  57. #define g_v78        20
  58. #define g_v79        21
  59. #define g_altc        22
  60.  
  61. #define g_edcs        23    /* external debugger */
  62. #define g_edds        24
  63. #define g_edtss        25
  64.  
  65. #define g_rtss        26
  66.  
  67. /* CB change: relocated arena code and VESA paging func selector */
  68. /* OLD:
  69.  * #define g_num    27
  70.  */
  71. #define g_acode        27
  72. #define g_VESAfunc    28
  73.  
  74. #define g_num        29
  75. /* end CB change */
  76.  
  77.  
  78. extern GDT_S gdt[g_num];
  79. extern word32 ARENA;
  80. extern word16 core_selector;
  81. extern word16 arena_cs;
  82. extern word16 arena_ds;
  83.